#pragma once
#include "..\InterfaceModRunCreate.h"
#include "..\FactoryModRun.h"

template<typename T>
class  ModRunBase
{
public:
    ModRunBase();
    virtual ~ModRunBase();

    static int Register();

public:

    inline static int result = Register();
};

template<typename T>
ModRunBase<T>::ModRunBase()
{

}

template<typename T>
ModRunBase<T>::~ModRunBase()
{

}

template<typename T>
int ModRunBase<T>::Register()
{
    ST_EMCREATE stCreate;
    stCreate.emStatus = T::GetEnum();
    stCreate.Func = &(T::CreateMe);

    FactoryModRun::GetInstance()->_createEntries[stCreate.emStatus] = stCreate;
    return 0;
}

